#include "AnimationManager.hpp"

namespace sl
{
	namespace tmp
	{
		AnimationManagerS* AnimationManagerS::Update(float time)
		{
			for (std::map<std::string, Animation*>::iterator iter = myData.begin(); iter != myData.end(); iter++)
				iter->second->Update(time);

			return this;
		}

		AnimationManagerS* AnimationManagerS::Draw(sf::RenderTarget* render)
		{
			for (std::map<std::string, Animation*>::iterator iter = myData.begin(); iter != myData.end(); iter++)
				if (iter->second->HasATexture())
					if (render != NULL)
						render->Draw(*iter->second);
					else
						(*RenderScreen)()->Draw(*iter->second);


			return this;
		}
	}
}